package com.willie.boot.rabbit.consumer;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * </p>
 *
 * @author willie
 * @since 2019/1/31
 */
@Component
@RabbitListener(queuesToDeclare = @Queue("hey"))
public class MyMQConsumer {
    @RabbitHandler
    public void process(String s) {
        System.out.println("Receiver:" + s);
    }
}
